package com.yfl.logistics.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.yfl.logistics.pojo.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author ${author}
 * @since 2020-06-13
 */
@Repository
public interface UserMapper extends BaseMapper<User> {

    @Select("select u.*,r.rolename from t_user u LEFT JOIN t_role r ON u.role_id=r.role_id ${ew.customSqlSegment}")
    IPage<User> selectAdminRole(IPage iPage, @Param(Constants.WRAPPER) QueryWrapper wrapper);

}
